package web.study.tag;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.Tag;
import javax.servlet.jsp.tagext.TagSupport;

public class InvokeOrderTag extends TagSupport
{
    /**
     * 序列化
     */
    private static final long serialVersionUID = 1L;
    
    private String attr1;
    
    private String attr2;
    
    public String getAttr1()
    {
        return attr1;
    }
    
    public void setAttr1(String attr1)
    {
        System.out.println("attr1:" + attr1);
        this.attr1 = attr1;
    }
    
    public String getAttr2()
    {
        return attr2;
    }
    
    public void setAttr2(String attr2)
    {
        System.out.println("attr2:" + attr2);
        this.attr2 = attr2;
    }
    
    @Override
    public void setPageContext(PageContext pageContext)
    {
        System.out.println("set pageContext:" + pageContext);
        super.setPageContext(pageContext);
    }
    
    @Override
    public void setParent(Tag t)
    {
        System.out.println("set parent Tag:" + t);
        super.setParent(t);
    }
    
    @Override
    public int doAfterBody()
        throws JspException
    {
        System.out.println("do after body");
        return super.doAfterBody();
    }
    
    @Override
    public int doStartTag()
        throws JspException
    {
        System.out.println("do start tag");
        return super.doStartTag();
    }
    
    @Override
    public int doEndTag()
        throws JspException
    {
        System.out.println("do end tag");
        return super.doEndTag();
    }
    
    @Override
    public void release()
    {
        System.out.println("release tag");
        super.release();
    }
}
